﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChaoBiaoSJLR.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.ChaoBiaoGL.ChaoBiaoSJLR" Theme="Default"%>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>抄表数据录入</title>
    <script src="../../../../JS/jquery.js" type="text/javascript"></script>
    <script src="../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <script type="text/javascript">
        function Search(s) {
            if (s.GetText() == "") {
                alert("用户号不能为空，请输入");
                txtYongHuH.focus();
            }
            else {
                hdCollection.Set("yhh", s.GetText());
                ASPxCallback1.PerformCallback("info");
                //树定位
                hidden.onClick();
            }
           
        }

        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            if (type == "info") {
                //treeChaoBiaoSH
                txtYongHuM.SetText(arr[2]);
                txtShuiJia.SetText(arr[3]);
                txtJingBH.SetText(arr[4]);
                txtQuShuiDD.SetText(arr[5]);
                cbmCeHao.SetText(arr[6]);
                txtShuiBiaoBH.SetText(arr[7]);
                if (arr[8] == "1")
                {
                    txtShuiLiangLB.SetText("普通采"); 
                }
                else if (arr[8] == "2")
                {
                    txtShuiLiangLB.SetText("采灌采");
                }
                else if (arr[8] == "3")
                {
                    txtShuiLiangLB.SetText("采灌灌");
                }
                else if (arr[8] == "4")
                {
                    txtShuiLiangLB.SetText("矿泉采");
                }
                else if (arr[8] == "5")
                {
                    txtShuiLiangLB.SetText("专灌");
                }
                
                txtChaoBiaoZT.SetText(arr[9]);
                txtBenYueCH.SetText(arr[10]);
                txtBenYueSL.SetText(arr[11]);
                txtShangYueCM.SetText(arr[12]);
                txtShangYueSL.SetText(arr[13]);
                txtKaiZhangSL.SetText(arr[14]);
                txtBenYueDL.SetText(arr[15]);
                txtKaiZhangDL.SetText(arr[16]);
                OnKeyNext(txtChaoBiaoZT);

            }
           
        }
    </script>
</head>

<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
           传输抄码
        </div>
          <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
         <div style="display:none;">
             <dx:ASPxButton runat="server" ID="hidden" OnClick="hidden_Click" ClientInstanceName="hidden"></dx:ASPxButton>
         </div>
        <asp:UpdatePanel runat="server" ID="updatePanel1">
            <ContentTemplate>
                <table style="width: 98%; height: 400px">
                    <tr>
                        <td style="width: 40%" valign="top">
                            <div>
                                <fieldset style="border: 1px solid  #d0e4fe;">
                                    <dx:ASPxTreeList ID="treeChaoBiaoSH" ClientInstanceName="treeChaoBiaoSH" runat="server" Width="100%" KeyFieldName="BIANHAO1" ParentFieldName="BIANHAO2"
                                        SettingsPager-AlwaysShowPager="true" AutoGenerateColumns="false" OnFocusedNodeChanged="treeChaoBiaoSH_FocusedNodeChanged"
                                        EnableCallbacks="false">
                                        <Columns>
                                            <dx:TreeListDataColumn FieldName="ID" Visible="false"></dx:TreeListDataColumn>
                                            <dx:TreeListDataColumn FieldName="BIANHAO2" Visible="false"></dx:TreeListDataColumn>
                                            <dx:TreeListTextColumn FieldName="BIANHAO1" Caption="名称"></dx:TreeListTextColumn>
                                        </Columns>
                                        <Settings ShowColumnHeaders="false" />
                                        <SettingsBehavior AutoExpandAllNodes="true" AllowFocusedNode="true" ProcessFocusedNodeChangedOnServer="true" ExpandCollapseAction="NodeDblClick" />
                                        <SettingsText LoadingPanelText="正在加载请稍候......" />
                                        <Settings VerticalScrollBarMode="Auto" ScrollableHeight="530" />
                                    </dx:ASPxTreeList>
                                </fieldset>
                            </div>
                        </td>
                        <td style="width: 60%" align="center" valign="top">
                            <table>
                                <tr>
                                    <td align="right">传输水量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtChuanShuSL" runat="server" MaxLength="6" ClientEnabled="false" Width="60%">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">水量年月：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtShuiLiangYM" runat="server" MaxLength="6" ClientEnabled="false" Width="60%">
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td align="right">水量单位：立方米</td>
                                </tr>
                                <tr>
                                    <td align="right">用户号：</td>
                                    <td align="left" >
                                        <dx:ASPxTextBox ID="txtYongHuH" runat="server" MaxLength="7" Width="60%" ClientInstanceName="txtYongHuH">
                                            <ClientSideEvents KeyPress="function(s,e){var code=event.keyCode;if(code==13){Search(s);}}" />
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td align="right">电量单位：万千瓦时</td>
                                </tr>
                                <tr>
                                    <td align="right">用户名：</td>
                                    <td align="left" colspan="3">
                                        <dx:ASPxTextBox ID="txtYongHuM" runat="server" Width="80%"  ClientEnabled="false" ClientInstanceName="txtYongHuM">
                                        </dx:ASPxTextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right"><span id="span1" runat="server"></span></td>
                                    <td align="left">
                                         <dx:ASPxTextBox ID="txtJingBH" runat="server" MaxLength="7" ClientEnabled="false" Width="60%" ClientInstanceName="txtJingBH">
                                        </dx:ASPxTextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">取水地点：</td>
                                    <td align="left" colspan="3">
                                          <dx:ASPxTextBox ID="txtQuShuiDD" runat="server" Width="80%" ClientEnabled="false" ClientInstanceName="txtQuShuiDD">
                                        </dx:ASPxTextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">册号：</td>
                                    <td align="left">
                                           <dx:ASPxComboBox ID="cbmCeHao" ClientInstanceName="cbmCeHao" runat="server" Width="80%">
                                            </dx:ASPxComboBox> 
                                    </td>
                                    <td align="right">水价：</td>
                                    <td align="left" >
                                          <dx:ASPxTextBox ID="txtShuiJia" runat="server" Width="80%" ClientEnabled="false" ClientInstanceName="txtShuiJia">
                                        </dx:ASPxTextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">水表编号：</td>
                                    <td align="left" >
                                          <dx:ASPxTextBox ID="txtShuiBiaoBH" runat="server" Width="80%" MaxLength="9" ClientInstanceName="txtShuiBiaoBH">
                                        </dx:ASPxTextBox> 
                                    </td>
                                    <td align="right">水量类别：</td>
                                    <td align="left">
                                          <dx:ASPxTextBox ID="txtShuiLiangLB" runat="server" Width="80%" ClientEnabled="false" ClientInstanceName="txtShuiLiangLB">
                                        </dx:ASPxTextBox> 
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">抄表状态：</td>
                                    <td align="left">
                                          <dx:ASPxTextBox ID="txtChaoBiaoZT" runat="server" Width="80%" ClientInstanceName="txtChaoBiaoZT">
                                               <ClientSideEvents  KeyPress="function(s,e){ OnKeyNext(txtBenYueCH);}"/>
                                        </dx:ASPxTextBox> 
                                    </td>
                                    <td align="left" colspan="2" style="color:blue;">0：正常，1：估计，2：换表，3：估换，4：不抄</td>
                                </tr>
                                <tr>
                                    <td align="right">本月抄码：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtBenYueCH" runat="server" Width="80%" ClientInstanceName="txtBenYueCH">
                                            <ClientSideEvents  KeyPress="function(s,e){ OnKeyNext(txtBenYueSL);}"/>
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td align="right">上月抄码：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtShangYueCM" runat="server" ClientEnabled="false" Width="80%" ClientInstanceName="txtShangYueCM">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">本月水量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtBenYueSL" runat="server" Width="80%" ClientInstanceName="txtBenYueSL">
                                            <ClientSideEvents  KeyPress="function(s,e){ OnKeyNext(btnSave);}"/>
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td align="right">上月水量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtShangYueSL" runat="server" ClientEnabled="false" Width="80%" ClientInstanceName="txtShangYueSL">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                  <tr>
                                    <td align="right">本月电量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtBenYueDL" runat="server" Width="80%" ClientInstanceName="txtBenYueDL" ClientEnabled="true" >
                                            <ClientSideEvents />
                                        </dx:ASPxTextBox>
                                    </td>
                                       <td align="right">开帐水量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtKaiZhangSL" runat="server" Width="80%" ClientInstanceName="txtKaiZhangSL"  ClientEnabled="false">
                                            <ClientSideEvents />
                                        </dx:ASPxTextBox>
                                    </td> 
                                </tr> 
                                 <tr>
                                     <td></td><td></td>
                                    <td align="right">开帐电量：</td>
                                    <td align="left">
                                        <dx:ASPxTextBox ID="txtKaiZhangDL" runat="server" Width="80%" ClientInstanceName="txtKaiZhangDL" ClientEnabled="false">
                                            <ClientSideEvents />
                                        </dx:ASPxTextBox>
                                    </td>

                                </tr>  
                            </table>
                            <br />
                            <div style="text-align: right;">

                                <hr />
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false" ClientInstanceName="btnSave"></dx:ASPxButton>
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false"></dx:ASPxButton>
                            </div>
                        </td>
                    </tr>
                </table>
               
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>

</html>
